<?php
$this->breadcrumbs=array(
    Yii::t('site','Settings')=>array('/site/settings'),
    Yii::t('site','Email Distribution Lists')=>array('index'),
    $model->recordName,
    Yii::t('site','View'),
);

$this->menu=array(
    array('label'=>Yii::t('site','Update Email Distribution List'), 'url'=>array('update', 'id'=>$model->id)),
    array('label'=>Yii::t('site','Delete Email Distribution List'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
    array('label'=>Yii::t('site','List Email Distribution Lists'), 'url'=>array('index')),
    array('label'=>Yii::t('site','Manage Email Distribution Lists'), 'url'=>array('admin')),
);
?>

<h1><?php echo Yii::t('site','View Email List <em>{recordName}</em>',array('{recordName}'=>$model->recordName)); ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
    'data'=>$model,
    'attributes'=>array(
        'id',
        'name',
        'description',
    ),
)); ?>

<h2><?php echo CHtml::encode(Yii::t('site','Participants')); ?></h2>
<table>
    <thead>
        <tr>
            <th>Type</th>
            <th>Name</th>
            <th>Email</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($emailListItems as $i=>$item): ?>
        <tr class="<?php echo $i%2 ? 'even' : 'odd'; ?>">
            <td><?php echo EmailListItem::model()->recipientTypeOptions[$item->recipientType]; ?></td>
            <td><?php echo CHtml::encode($item->recipientName); ?></td>
            <td><?php echo CHtml::encode($item->recipientEmail); ?></td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>
